import { useState } from 'react'
import logo from './logo.svg'
// import { useI18n } from 'use-i18n'
import './App.css'
import {useI18n,setLang} from './lang'

function App() {
  const t = useI18n();
  const [lang,setNewLang]=setLang();
  console.log(t);
  const change=()=>{
    setNewLang('en');
  }
  return (
    <div className="App">
      {t.welcom}
      <div>{lang}</div>
      <button onClick={change}>English</button>
    </div>
  )
}

export default App
